range: Implement :hover for the whole widget
authorBenjamin Otte <otte@redhat.com>
Sat, 29 Nov 2014 02:33:47 +0000 (03:33 +0100)
committerBenjamin Otte <otte@redhat.com>
Sat, 29 Nov 2014 02:42:29 +0000 (03:42 +0100)
gtk/gtkrange.c

index bfad44c8179ad9b97b24590ba8240ef96f0a68ed..404dc3a762c54cc302368d85020433fb91fd59cc 100644 (file)
@@ -3280,6 +3280,11 @@ gtk_range_update_mouse_location (GtkRange *range)
     {
       gtk_range_queue_draw_location (range, old);
       gtk_range_queue_draw_location (range, priv->mouse_location);
+
+      if (priv->mouse_location == MOUSE_OUTSIDE)
+        gtk_widget_unset_state_flags (widget, GTK_STATE_FLAG_PRELIGHT);
+      else
+        gtk_widget_set_state_flags (widget, GTK_STATE_FLAG_PRELIGHT, FALSE);
     }
 }